<template>
    <div class="about">
      <h2 class="c-default">环境</h2>
      <h1>{{ env }}</h1>
      <svg-icon icon-class="home" />
      <div class="mb32 textButton" @click="store.add">测试</div>
      <div class="mt12">
        {{ store.doubleCount }}
      </div>
      <div class="mt12">
        {{ store.multipleCount(10) }}
      </div>
  
      <div class="divButton btn flcc" @click="test">测试接口</div>
      <div class="divButton btn flcc" @click="testCancel">测试取消</div>
      
    </div>
  </template>
  
  <script setup>
  import { ref } from 'vue'
  import useStore from '@/store/modules/store.js'
  import { getToken } from '@/api/user.js'
  const store = useStore()
  
  const env = ref(import.meta.env.VITE_ENV)
  
  const api = () => {
    return server()
  }
  
  const test = async () => {
    const res = await getToken.send({ username: 'admin', password: 'admin123' })
  }
  
  const testCancel = ()=>{
    getToken.cancel()
  }
  </script>
  
  <style lang="scss" scoped>
  .btn {
    width: 100px;
    height: 30px;
    border-bottom: 1px solid black;
  }
  </style>
  